<template>
<div class="iframe-content">
  <header class="mui-bar mui-bar-nav bg-color" style="z-index:999;p">
    <span  class="iconfont icon-fanhui header_fanhui" @tap="goback"></span> 
    <span class="mui-icon mui-icon-search mui-pull-left header_search" style="display: none;"></span> 
    <h1 class="mui-title">{{title}}</h1> 
  </header>
  <iframe  style="height:100%;width:100%;margin-top:44px;" frameborder="0" scrolling="no" :src="linkUrl"></iframe>
</div>
</template>
<script>
import mui from 'static/js/mui'
export default {
  data() {
    return {
      linkUrl: '',
      title: ''
    }
  },

  created() {
    //获取路由参数'
    let routeVal = this.$route.params
    if(JSON.stringify(routeVal)!=="{}"){
      if(typeof(routeVal.current) !== 'undefined'){
        this.linkUrl = routeVal.current.linkUrl+"?id="+routeVal.current.id
        this.title = routeVal.current.activityName 
      }
    }
     mui.init({
          keyEventBind: {
          backbutton: true  //关闭back按键监听
          }
      })
      mui.back = function () {
          history.go(-1)
      }
  },
  methods:{
    goback(){
      history.go(-1)
    },
  }
}
</script>
<style lang="scss" scoped>
.iframe-content{
  height:100%;
  width:100%;
  position: absolute;
  z-index: 100;
  top:0px;
}
.header_fanhui {
  line-height: 43px;
  font-size: 0.9rem;
}
</style>
